<template>
  <div class="radioconut">
  <el-radio-group v-model="radio" class="my-radio">
            <table class="table table-bordered mytable ">
              <tbody>
                <!-- <tr>
                  <td @click="hidePcbNumber(5)">
                    <el-radio :label="5" >5</el-radio>
                  </td>
                  <td @click="hidePcbNumber(10)"> 
                    <el-radio :label="10" >10</el-radio>
                  </td>
                  <td @click="hidePcbNumber(15)">
                    <el-radio :label="15">15</el-radio>
                  </td>
                  <td>
                    <el-radio :label="20">20</el-radio>
                  </td>
                  <td>
                    <el-radio :label="25">25</el-radio>
                  </td>
                  <td>
                    <el-radio :label="30">30</el-radio>
                  </td>
                  <td>
                    <el-radio :label="50">50</el-radio>
                  </td>
                </tr> -->
                <tr v-for="item in items"  :key="item.index">
                   <td v-for="item2 in item.tr" :key="item2.count" @click="hidePcbNumber(item2.count)" >
                       <el-radio :label="item2.count" > {{item2.count}}</el-radio>
                      </td>
                </tr>
                
             
              </tbody>
            </table>
          </el-radio-group  >
          <el-row :gutter="1" class="mginput"  type="flex" justify="start">
           <el-col :span="4" class="pd">其它数量：</el-col>
           <el-col :span="8"><el-input  
            placeholder="订单数量"
            onkeyup="value=value.replace(/^[0][\d(\.)]/g,'')"
            v-model.number="count"
            @input="countInput" ></el-input>
            </el-col>
            <el-col :span="4" class="pd2"> <el-button type="primary" size="small" @click="onSubmit()">确定</el-button></el-col>
          
          </el-row>
          </div>
</template>

<script>
export default {
  data(){
      return{
          radio:0,
          count:"",
          items:[
            {tr:[{count:5},{count:10},{count:15},{count:20},{count:25},{count:30},{count:50}]},
            {tr:[{count:75},{count:100},{count:125},{count:150},{count:200},{count:250},{count:300}]},
            {tr:[{count:350},{count:400},{count:450},{count:500},{count:600},{count:700},{count:800}]},
            {tr:[{count:900},{count:1000},{count:1200},{count:1500},{count:1600},{count:1750},{count:1800}]},
            {tr:[{count:2000},{count:2400},{count:2500},{count:2800},{count:3000},{count:3500},{count:4000}]},
            {tr:[{count:4500},{count:5000},{count:5500},{count:6000},{count:6500},{count:7000},{count:7500}]},
            {tr:[{count:8000},{count:8500},{count:9000},{count:9500},{count:10000},{count:11000},{count:12000}]},
            {tr:[{count:13000},{count:14000},{count:15000},{count:16000},{count:17000},{count:18000}]}

          ]
      }
  },

methods:{
        countInput(v) {
      //限制只能输入整整数
      this.count = this.$myF.inputInt(v);
      console.log(this.count);
      if(!this.count){
        this.count=0
      }

    },
    onSubmit(){
         
         this.$emit('hiedc')
         this.radio=this.count
         this.$store.state.data.pcbNewOrder.orconut = this.count
    },
    hidePcbNumber(v){
        this.$emit('hiedc')
        this.$store.state.data.pcbNewOrder.orconut=v
        this.radio=v
 
    }

}

}
</script>

<style scoped >
.mginput{
  margin-bottom: 20px;
}



.my-radio  table{
  border: none;
}

.my-radio  td{


  border: none;
  border-bottom: 1px solid #f0f0f0;
  cursor:pointer;

}


.my-radio tr td:hover{
  outline: 1px solid #f0f0f0;
  box-shadow: 0px 1px 3px #dbdbdb;
  box-sizing: border-box;
  z-index: 10;
}
.pd{
  padding-top: 10px;
}
.pd2{
  padding-top: 5px;
}

.radioconut{
  position: relative;
  margin: 5px 5px 10px 5px;
}
</style>>

